package com.woniu.woniuproject.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 功能描述:<br>
 * 〈〉
 *
 * @author wugd
 * @create 2020/11/9
 * @since 1.0.0
 */

@Configuration
public class WebMvcConfig {

    @Bean
    public WebMvcConfigurer webMvcConfigurer(){
        return new WebMvcConfigurer() {
            @Override
            public void addViewControllers(ViewControllerRegistry registry) {
                registry.addViewController("/loginView.html").setViewName("login");
                //registry.addViewController("/regView.html").setViewName("register");
                registry.addViewController("/course_list.html").setViewName("course_list");
            }
        };
    }
}
